Skip to content

fix(react-form-start): replace deprecated inputValidator with validator#2230

Merged
crutchcorn merged 4 commits into
TanStack:mainfrom
smorimoto:fix/replace-inputvalidator-with-validator
Jul 9, 2026
Merged

fix(react-form-start): replace deprecated inputValidator with validator#2230
crutchcorn merged 4 commits into
TanStack:mainfrom
smorimoto:fix/replace-inputvalidator-with-validator

Conversation

@smorimoto

@smorimoto smorimoto commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

TanStack Start has deprecated createServerFn().inputValidator() in favour of .validator(). Projects using @tanstack/react-form-start were seeing a build-time deprecation warning from the Start compiler.

This PR updates the library, example, and SSR documentation to use the new API, and bumps the @tanstack/react-start peer dependency to ^1.168.27, which includes the validator() method.

Changes

  • Replace .inputValidator() with .validator() in createServerValidate.tsx
  • Update the TanStack Start example and SSR guide
  • Bump @tanstack/react-start to ^1.168.27 in react-form-start and the example
  • Refresh pnpm-lock.yaml and add minimumReleaseAgeExclude entries for the updated TanStack packages

Test plan

  • Built @tanstack/react-form and @tanstack/react-form-start successfully
  • Verify the deprecation warning no longer appears when running the TanStack Start example

Summary by CodeRabbit

  • Bug Fixes
    • Updated form/server validation configuration to align with the latest TanStack Start validation API, ensuring POST request validation continues to work correctly.
  • Documentation
    • Updated the SSR “Start integration” guide to reflect the current validation syntax.
  • Chores
    • Bumped TanStack Start dependency versions in the React form/start example and related packages.
    • Adjusted dependency declarations in the Next.js and Remix packages to rely on peer dependencies only.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 54b9b326-4a97-45c1-8b98-dad7773adf03

📥 Commits

Reviewing files that changed from the base of the PR and between f25ed02 and 88bfc4a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • docs/framework/react/guides/ssr.md
  • examples/react/tanstack-start/package.json
  • packages/react-form-nextjs/package.json
  • packages/react-form-remix/package.json
  • packages/react-form-start/package.json
✅ Files skipped from review due to trivial changes (1)
  • docs/framework/react/guides/ssr.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • examples/react/tanstack-start/package.json
  • packages/react-form-start/package.json

📝 Walkthrough

Walkthrough

Updates server-function validation calls from .inputValidator(...) to .validator(...) in docs and source examples, and adjusts @tanstack/react-start package manifests and version constraints across the example and framework packages.

Changes

Validator rename and dependency updates

Layer / File(s) Summary
Rename validator chain method in core and example code
packages/react-form-start/src/createServerValidate.tsx, examples/react/tanstack-start/src/utils/form.tsx, docs/framework/react/guides/ssr.md
The server function chain method used for validating incoming request data is renamed from .inputValidator(...) to .validator(...), with unchanged validation logic in each location.
Align react-start dependency ranges
examples/react/tanstack-start/package.json, packages/react-form-start/package.json, packages/react-form-nextjs/package.json, packages/react-form-remix/package.json
@tanstack/react-start version constraints are bumped in the example and start package manifests, and removed from the Next.js and Remix manifests where it is no longer declared.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: tannerlinsley

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change, but it does not follow the required template and omits the checklist and release impact sections. Add the required template sections: ## 🎯 Changes, ## ✅ Checklist, and ## 🚀 Release Impact, with the requested checkbox items filled out.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: replacing deprecated inputValidator with validator.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@socket-security

socket-security Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​tanstack/​react-start@​1.168.27991008498100

View full report

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

TanStack Start has deprecated createServerFn().inputValidator() in favour
of .validator(). Update the react-form-start package, example, and SSR docs
accordingly, and bump the @tanstack/react-start peer dependency to ^1.168.27
where the new API is available.
# Conflicts:
#	packages/react-form-nextjs/package.json
#	packages/react-form-remix/package.json
#	packages/react-form-start/package.json
#	pnpm-lock.yaml
@nx-cloud

nx-cloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 88bfc4a

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 4m 46s View ↗
nx run-many --target=build --exclude=examples/** ✅ Succeeded 42s View ↗

☁️ Nx Cloud last updated this comment at 2026-07-09 10:14:23 UTC

@pkg-pr-new

pkg-pr-new Bot commented Jul 9, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-form

npm i https://pkg.pr.new/@tanstack/angular-form@2230

@tanstack/form-core

npm i https://pkg.pr.new/@tanstack/form-core@2230

@tanstack/form-devtools

npm i https://pkg.pr.new/@tanstack/form-devtools@2230

@tanstack/lit-form

npm i https://pkg.pr.new/@tanstack/lit-form@2230

@tanstack/preact-form

npm i https://pkg.pr.new/@tanstack/preact-form@2230

@tanstack/react-form

npm i https://pkg.pr.new/@tanstack/react-form@2230

@tanstack/react-form-devtools

npm i https://pkg.pr.new/@tanstack/react-form-devtools@2230

@tanstack/react-form-nextjs

npm i https://pkg.pr.new/@tanstack/react-form-nextjs@2230

@tanstack/react-form-remix

npm i https://pkg.pr.new/@tanstack/react-form-remix@2230

@tanstack/react-form-start

npm i https://pkg.pr.new/@tanstack/react-form-start@2230

@tanstack/solid-form

npm i https://pkg.pr.new/@tanstack/solid-form@2230

@tanstack/solid-form-devtools

npm i https://pkg.pr.new/@tanstack/solid-form-devtools@2230

@tanstack/svelte-form

npm i https://pkg.pr.new/@tanstack/svelte-form@2230

@tanstack/vue-form

npm i https://pkg.pr.new/@tanstack/vue-form@2230

commit: 88bfc4a

@crutchcorn crutchcorn merged commit 42c866a into TanStack:main Jul 9, 2026
9 checks passed
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.74%. Comparing base (6892ed0) to head (88bfc4a).
⚠️ Report is 252 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2230      +/-   ##
==========================================
- Coverage   90.35%   89.74%   -0.62%     
==========================================
  Files          38       65      +27     
  Lines        1752     3207    +1455     
  Branches      444      810     +366     
==========================================
+ Hits         1583     2878    +1295     
- Misses        149      295     +146     
- Partials       20       34      +14     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@smorimoto smorimoto deleted the fix/replace-inputvalidator-with-validator branch July 9, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants